export default ({ $axios }, inject) => {
  inject('generalGet', (model, data) => $axios({
    url: '/' + model + '',
    method: 'get',
    params: data
  }))
  inject('generalPostMethod', (model, method, data) => $axios({
    url: '/' + model + '/' + method,
    method: 'post',
    data
  }))
  inject('generalPatchOne', (model, data) => $axios({
    url: "/" + model + "/me",
    method: "patch",
    data,
  }))
  inject('generalGetOne', (model, id, data) => $axios({
    url: '/' + model + '/' + id,
    method: 'get',
    params: data
  }))
  inject('generalPost', (model, data) => $axios({
    url: '/' + model + '',
    method: 'post',
    data
  }))
  inject('generalDelete', (model, id) => $axios({
    url: '/' + model + '/' + id + '',
    method: 'delete'
  }))
}